Closed Bug 941325 Opened 12 years ago Closed 11 years ago

[10.9] Focus rings do not appear on buttons, checkbox, radio or drop-down inputs when building with the 10.9 SDK

Categories

(Core :: Widget: Cocoa, defect)

All
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla30

People

(Reporter: MattN, Assigned: mstange)

References

()

Details

(Keywords: access, testcase)

Attachments

(2 files)

The focus rings do not show on buttons, checkbox, radio or drop-down inputs when building with the 10.9 SDK. The elements are still focused with the tab key so you can toggle the state with the spacebar but there is no visual feedback of what is focused. See the attached testcase.
This may be useful: "NSButtonCell has been moved to property[sic] use the NSView and NSCell focusRingMask* API. These bugs have been fixed for all applications on 10.9, and any applications providing (or hiding) the focus ring should use the focusRingMask* methods to provide (or customize) the focus ring."[1] [1] https://developer.apple.com/library/mac/releasenotes/AppKit/RN-AppKit/#//apple_ref/doc/uid/TP30000741-CH2-SW48
Assignee: nobody → mstange
Status: NEW → ASSIGNED
Actually, this happens when building with the 10.8 SDK as well (I was just about to file a bug), but that's because calling 'setShowsFirstResponder:YES' on a NSButtonCell doesn't include the focus ring when you draw the cell. https://developer.apple.com/library/mac/releasenotes/AppKit/RN-AppKitOlderNotes/#X10_8Notes "NSButton / NSButtonCell For applications linked on 10.8, NSButton and NSButtonCell now use the Lion API drawFocusRingMask and focusRingMaskBounds to do its focus ring drawing. Previously, calling setShowsFirstResponder:YES on NSButtonCell and manually drawing the cell would include the focus ring. On 10.8 this is no longer the case, the cell no longer explicitly draws the focus ring. To customize the focus ring, override NSButtonCell's implementation of drawFocusRingMaskWithFrame:inView:." Webkit did like this: http://trac.webkit.org/changeset/102246/trunk/Source/WebCore/platform/mac/ThemeMac.mm
Attached patch v1Splinter Review
Thanks for the pointers, Stefan!
Attachment #8373336 - Flags: review?(smichaud)
Comment on attachment 8373336 [details] [diff] [review] v1 Looks fine to me. I haven't tested it, though.
Attachment #8373336 - Flags: review?(smichaud) → review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: